package com.ywd.platform.context;

/**
 *
 */
public class WebSocketContext {

    private static final ThreadLocal<Long> userHolder = new ThreadLocal<>();

    public static void setUserId(Long userId) {
        userHolder.set(userId);
    }

    public static Long getUserId() {
        return userHolder.get();
    }

    public static void clearUserId() {
        userHolder.remove();
    }
}
